<template>
  <div>
    <div v-if="!editing">
      <span
        style="overflow:hidden; max-height:48px;"
        v-html="value.cval" v-if="value.cval"
      /></div>

  </div>
</template>

<script>

  export default {
    name: 'FieldHtml',
    components: {},
    props: {
      field: {
        type: Object,
        default() {
          return {cval: ''}
        }
      }, model: {type: String, default: ''},
      id: {type: Number, default: 0},
      edit: {type: Boolean, defautl: false},
      saveFast: {type: Boolean, default: true}
    },
    inject: ['value'],
    data: function () {
      return {
        newval: this.value.cval,
        editing: false,
        editorOption: {
          modules: {
            toolbar: [
              [{'header': [1, 2, 3, 4, 5, 6, false]}],
              [{'header': 1}, {'header': 2}],
              [{'align': []}],
              ['bold', 'italic', 'underline', 'strike'],
              [{'list': 'ordered'}, {'list': 'bullet'}]
            ]
          }
        }
      }
    },
    computed: {},
    methods: {

      show: function () {
        this.editing = true
      }
    }
  }
</script>

<style scoped>

</style>
